const { Sequelize } = require('sequelize');

const sequelize = new Sequelize('forum', 'root', 'root', {
  host: 'localhost',
  // host: '47.113.203.8',
  dialect: 'mysql',
  timezone: '+08:00',
  define: {
    freezeTableName: true,
    createdAt: 'created_time',
    updatedAt: 'updated_time',
  },
  dialectOptions: {
    charset: 'utf8mb4',
    dateStrings: true,
    typeCast: true,
  },
});

module.exports = sequelize;
